// ConsoleTestProject.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

// [header]
// A very basic raytracer example.
// [/header]
// [compile]
// c++ -o raytracer -O3 -Wall raytracer.cpp
// [/compile]
// [ignore]
// Copyright (C) 2012  www.scratchapixel.com
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
// [/ignore]
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <fstream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <map>
#include <random>
#include <iostream>
#include "OctTree.h"
#include "..\RayTracing\BVH.h"
#include <memory>
#include <vector>
#include <random>
#include "..\RayTracing\Common.h"
#include <fstream>

#include <boost\iostreams\device\mapped_file.hpp>

using namespace std;


int main(int argc, char* argv[])
{
	boost::iostreams::mapped_file_source file;
	int numberOfElements = 1000000;
	int numberOfBytes = numberOfElements * sizeof(int);
	file.open("C:\\Users\\Adrian\\Desktop\\Bunny.obj", numberOfBytes);

	if (file.is_open())
	{
		int * currentPointer = (int*)file.data();

		for (int i = 0; i < numberOfElements; i++)
		{
			std::cout << currentPointer[i] << endl;
		}

		file.close();
	}
	else
	{
		cout << "problem here ---- file was not found" << endl;
	}
	
	system("pause");
	return 0;
}


//int main()
//{
//	
//	//WhittedRunRayTracer();
//	/*std::map<std::string, std::string> test;
//	/*test["helo"] = "hello";*/
//	/*std::string path = "C:\\Users\\Adrian\\Desktop\\CornellBoxobj.mtl";
//	std::ifstream myFile(path);
//
//	if(myFile.is_open())
//	{
//		std::cout << "its open" << std::endl;
//	}*/
//	
//
//	/*Engine::Logger log;
//	while (1)
//	{
//		double output = erand48(1);
//		std::cout << output << std::endl;
//		system("pause");
//	}*/
//	
//	//std::random_device rd;
//	//std::mt19937 gen(rd());
//	//std::uniform_real_distribution<> dis(1, 30);
//	
//	return dis(gen);
//	
//	
//
//	system("pause");
//}


